package com.vhall.component.entity.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author guoxin.wang
 * @date 2021/7/2 17:45
 */
@Data
@TableName("order_detail")
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "OrderDetailEntity对象", description = "订单详情表")
public class OrderDetailEntity implements Serializable {

    private static final long serialVersionUID = -8076065544147112881L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty(value = "房间id")
    @JsonProperty("room_id")
    @TableField("room_id")
    private String roomId;

    @ApiModelProperty(value = "用户id")
    @JsonProperty("account_id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "应用id")
    @JsonProperty("app_id")
    @TableField("app_id")
    private String appId;

    @ApiModelProperty(value = "0:收入 ，1：支出")
    @JsonProperty("status")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "支付方式：1：微信   2：支付包")
    @JsonProperty("channel")
    @TableField("channel")
    private Integer channel;

    @ApiModelProperty(value = "来源| 0：充值红包,1：表情,2：打赏,3：提现'")
    @JsonProperty("source")
    @TableField("source")
    private Integer source;

    @ApiModelProperty(value = "流水订单号")
    @JsonProperty("trade_no")
    @TableField("trade_no")
    private String tradeNo;

    @ApiModelProperty(value = "创建时间")
    @JsonProperty("created_at")
    @TableField("created_at")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间")
    @JsonProperty("updated_at")
    @TableField("updated_at")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "删除时间")
    @JsonProperty("deleted_at")
    @TableField("deleted_at")
    private LocalDateTime deletedAt;

}
